Rename TSS_sysenter_esp0 to SYSENTER_stack_esp0 to reflect the actual
authorIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Fri, 21 Apr 2006 16:49:10 +0000 (17:49 +0100)
committerIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Fri, 21 Apr 2006 16:49:10 +0000 (17:49 +0100)
usage since the TSS is not used under Xen.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
linux-2.6-xen-sparse/arch/i386/kernel/asm-offsets.c
linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S
patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch [new file with mode: 0644]

index c7e3c078a20fd45c66768672a2c27f5de9379f32..547eb452b3ab8629c5dac6df2707623631565cc5 100644 (file)
@@ -66,11 +66,11 @@ void foo(void)
 
 #ifndef CONFIG_X86_NO_TSS
        /* Offset from the sysenter stack to tss.esp0 */
-       DEFINE(TSS_sysenter_esp0, offsetof(struct tss_struct, esp0) -
+       DEFINE(SYSENTER_stack_esp0, offsetof(struct tss_struct, esp0) -
                 sizeof(struct tss_struct));
 #else
        /* sysenter stack points directly to esp0 */
-       DEFINE(TSS_sysenter_esp0, 0);
+       DEFINE(SYSENTER_stack_esp0, 0);
 #endif
 
        DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
index 770d2e1fb44ae24e332b88e074f3e4f1dc6c3402..8c5ace45ef873888b5fdb116cdae3032c66dfdc8 100644 (file)
@@ -207,7 +207,7 @@ need_resched:
 
        # sysenter call handler stub
 ENTRY(sysenter_entry)
-       movl TSS_sysenter_esp0(%esp),%esp
+       movl SYSENTER_stack_esp0(%esp),%esp
 sysenter_past_esp:
        sti
        pushl $(__USER_DS)
@@ -712,7 +712,7 @@ device_available_emulate:
  * that sets up the real kernel stack. Check here, since we can't
  * allow the wrong stack to be used.
  *
- * "TSS_sysenter_esp0+12" is because the NMI/debug handler will have
+ * "SYSENTER_stack_esp0+12" is because the NMI/debug handler will have
  * already pushed 3 words if it hits on the sysenter instruction:
  * eflags, cs and eip.
  *
@@ -724,7 +724,7 @@ device_available_emulate:
        cmpw $__KERNEL_CS,4(%esp);              \
        jne ok;                                 \
 label:                                         \
-       movl TSS_sysenter_esp0+offset(%esp),%esp;       \
+       movl SYSENTER_stack_esp0+offset(%esp),%esp;     \
        pushfl;                                 \
        pushl $__KERNEL_CS;                     \
        pushl $sysenter_past_esp
diff --git a/patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch b/patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
new file mode 100644 (file)
index 0000000..7f99a39
--- /dev/null
@@ -0,0 +1,31 @@
+Index: sysenter/linux-2.6-xen-sparse/arch/i386/kernel/entry.S
+===================================================================
+--- linux-2.6.16.orig/arch/i386/kernel/entry.S 2006-04-05 11:12:51.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/entry.S      2006-04-05 11:12:52.000000000 +0100
+@@ -177,7 +177,7 @@
+       # sysenter call handler stub
+ ENTRY(sysenter_entry)
+-      movl TSS_sysenter_esp0(%esp),%esp
++      movl SYSENTER_stack_esp0(%esp),%esp
+ sysenter_past_esp:
+       sti
+       pushl $(__USER_DS)
+@@ -492,7 +492,7 @@
+  * that sets up the real kernel stack. Check here, since we can't
+  * allow the wrong stack to be used.
+  *
+- * "TSS_sysenter_esp0+12" is because the NMI/debug handler will have
++ * "SYSENTER_stack_esp0+12" is because the NMI/debug handler will have
+  * already pushed 3 words if it hits on the sysenter instruction:
+  * eflags, cs and eip.
+  *
+@@ -504,7 +504,7 @@
+       cmpw $__KERNEL_CS,4(%esp);              \
+       jne ok;                                 \
+ label:                                                \
+-      movl TSS_sysenter_esp0+offset(%esp),%esp;       \
++      movl SYSENTER_stack_esp0+offset(%esp),%esp;     \
+       pushfl;                                 \
+       pushl $__KERNEL_CS;                     \
+       pushl $sysenter_past_esp